package com.wdz.mvr.Services;

import com.wdz.mvr.dao.ActorRepository;
import com.wdz.mvr.dao.MovieRepository;
import com.wdz.mvr.entities.Actor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ActorService {

    @Autowired
    ActorRepository actorRepository;


    public Actor save(Actor actor) {
        return actorRepository.save(actor);
    }

    public List<Actor> getAll() {
        return actorRepository.findAll();
    }


}